#include<bits/stdc++.h>
using namespace std;
int a[101];
int main(){
    int n;
    cin >> n;
    for(int i = 1; i <= n; i++){
        cin >> a[i];
    }
    int t1 = a[n];
    int t2 = a[n - 1];
    // 1 -> 3  2 -> 4 3 -> 5
    for(int i = n - 2; i >= 1; i--){
        a[i + 2] = a[i];
    }
    a[1] = t2;
    a[2] = t1;
    for(int i = 1; i <= n; i++){
        cout << a[i] << " ";
    }
    
    return 0;
}

/*
5
1 2 3 4 5
最右2个数循环移至最左面的2个位置
----------
4 5 1 2 3

*/